import React, { useEffect, useState } from "react";
import { View, Text, Button } from "@tarojs/components";
import {loginService} from "@/api/login/service"
import "./index.scss";

export default function Index() {
  const [count, setCount] = useState(0);
  useEffect( ()=>{
    login()
  })

  async function login() {
   const res = await loginService({
      mobile:15828491811,
      password:"123456"
    })
    console.log(res)
    
  }
  return (
    <View className='index'>
      <Text className='title'>Hello world!{count}</Text>
      <Button
        appPackagename='btn'
        appBundleid='btn'
        appConnectId='btn'
        onClick={() => setCount(count + 1)}
      >
        Click me
      </Button>
    </View>
  );
}
